//
//  ViewControllerA.m
//  TransValue_xib
//
//  Created by Justsoso on 16/2/25.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "ViewControllerA.h"
#import "ViewControllerB.h"
#import "ViewControllerC.h"

@interface ViewControllerA ()<ViewControllerCDelegate>

@end

@implementation ViewControllerA

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)loginBtnPressed:(id)sender
{
    ViewControllerB *vcB = [[ViewControllerB alloc] init];
    vcB.modalPresentationStyle = UIModalPresentationFullScreen;
    vcB.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    vcB.username = self.userNameTextField.text;
    vcB.password = self.passWordTextField.text;
    
    
    [self presentViewController:vcB animated:YES completion:nil];
}

- (IBAction)logonBtnPressed:(id)sender
{
    ViewControllerC *vcC = [[ViewControllerC alloc] init];
    vcC.modalPresentationStyle = UIModalPresentationFullScreen;
    vcC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    vcC.delegate = self;
    [self presentViewController:vcC animated:YES completion:nil];
    
}

- (void)transUserName:(NSString *)u andPassword:(NSString *)p andEmail:(NSString *)e
{
    self.infoLabel.text = [NSString stringWithFormat:@"注册成功!!\n 用户:%@密码:%@邮箱:%@",u,p,e];
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self.view endEditing:YES];
}

@end
